<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>home</title>

    <!-- BOOTSTRAP STYLES-->
    <link href="assets/css/bootstrap.css" rel="stylesheet"/>
    <!-- FONTAWESOME STYLES-->
    <link href="assets/css/font-awesome.css" rel="stylesheet"/>
    <!--CUSTOM BASIC STYLES-->
    <link href="assets/css/basic.css" rel="stylesheet"/>
    <!--CUSTOM MAIN STYLES-->
    <link href="assets/css/custom.css" rel="stylesheet"/>
    <!-- GOOGLE FONTS-->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
</head>
<body>
<div id="wrapper">
    <nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.html">qhit-Y</a>
        </div>

        <div class="header-right">
            <button id="logout" class="btn btn-danger" title="Logout"><i class="fa fa-exclamation-circle fa-2x"></i>
            </button>
        </div>
    </nav>
    <frameset cols="100,*">
        <frame src="index.html">
        <frame src="login.html" name="view_frame">
    </frameset>
    <!-- /. NAV TOP  -->
    <nav class="navbar-default navbar-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="main-menu">
                <li>
                    <div class="user-img-div">
                        <img src="assets/img/user.jpg" class="img-thumbnail"/>
                        <div class="inner-text">
                            <p id="userNameInfo"></p>
                            Last Login :
                            <small id="logintime"></small>
                        </div>
                    </div>
                </li>

                <li>
                    <a class="active-menu" href="index.html">
                        <i class="fa fa-dashboard ">
                        </i>Refresh</a>
                </li>

                <li>
                    <a href="#"><i class="fa fa-desktop "></i>我的工作台<span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-toggle-on"></i>待办列表</a>
                        </li>

                        <li>
                            <a href="Workbench/Personaldata.html" target="iframeicon"><i class="fa fa-bug "></i>个人资料</a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a href="#"><i class="fa fa-desktop "></i>系统管理<span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a href="FormuAndDist/RoleManagement.html" target="iframeicon"><i
                                    class="fa fa-toggle-on"></i>角色管理</a>
                        </li>

                        <li>
                            <a href="SystemManagement/UserManagement.html" target="iframeicon"><i
                                    class="fa fa-bug "></i>用户管理</a>
                        </li>

                        <li>
                            <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-bug "></i>角色权限设置</a>
                        </li>

                        <li>
                            <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-bug "></i>系统设置</a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-flash "></i>杆塔管理</a>
                </li>

                <li>
                    <a href="LineManagement/LineManagement.html" target="iframeicon"><i  class="fa fa-flash "></i>线路管理</a>
                </li>

                <li>
                    <a href="#"><i class="fa fa-desktop "></i>缺陷管理<span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-toggle-on"></i> 缺陷类型设置</a>
                        </li>

                        <li>
                            <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-bug "></i>缺陷类型设置</a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a href="#"><i class="fa fa-desktop "></i>巡检任务管理<span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a href="Inspection/FormuAndDist.html" target="iframeicon"><i class="fa fa-toggle-on"></i>制定与分配</a>
                        </li>

                        <li>
                            <a href="Inspection/ExecutionAndReceipt.html" target="iframeicon"><i class="fa fa-bug "></i>执行与回执</a>
                        </li>
                        <li>
                            <a href="Inspection/DefectQuery.html" target="iframeicon"><i class="fa fa-bug "></i>缺陷查询</a>
                        </li>
                    </ul>
                </li>

                <li>
                    <a href="#"><i class="fa fa-desktop "></i>消缺任务管理<span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-toggle-on"></i> 消缺任务制定与分配</a>
                        </li>

                        <li>
                            <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-bug "></i>消缺任务执行与回执</a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="#"><i class="fa fa-desktop "></i>信息统计<span class="fa arrow"></span></a>
                    <ul class="nav nav-second-level">
                        <li>
                            <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-toggle-on"></i> 巡检记录统计</a>
                        </li>

                        <li>
                            <a href="Workbench/Todo.html" target="iframeicon"><i class="fa fa-bug "></i>消缺记录统计</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
    <!-- /. NAV SIDE  -->
    <div id="page-wrapper">
        <div id="page-inner">
            <iframe src="welcome.html"
                    name="iframeicon"
                    width="100%"
                    height="1145px"
                    scrolling="no">
            </iframe>
        </div>
        <!-- /. PAGE INNER  -->
    </div>
    <!-- /. PAGE WRAPPER  -->
</div>
<!-- /. WRAPPER  -->

<div id="footer-sec" style="text-align: center">
    Copyright &copy; 2020.Company name All rights reserved
</div>
<!-- /. FOOTER  -->
<!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
<!-- JQUERY SCRIPTS -->
<script src="assets/js/jquery.min.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.min.js"></script>
<!-- METISMENU SCRIPTS -->
<script src="assets/js/jquery.metisMenu.js"></script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>

<script type="text/javascript">
    $(function () {
        init();
        $("#logout").click(function () {
            logout();
        })
    })

    //初始化页面
    function init() {
        var userName = sessionStorage.getItem("userName");
        var lastLoginTime = sessionStorage.getItem("lastLoginTime");
        $("#userNameInfo").html(userName);
        $("#logintime").html(lastLoginTime);
    }

    //登出页面
    function logout() {
        $.ajax({
            url: "http://localhost:8080/user/logout",
            type: "get",
            dataType: "json",
            success: function (data) {
                sessionStorage.removeItem("userName");
                window.location.href = 'login.html';
            }
        })
    }
</script>
</body>
</html>
